Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correctly load materials #1292

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

Markus-Simonsen
Copy link

Adresses #1220
I took inspiration from a solution to a similar problem in Moveit2.
I must admit that I don't know exactly how this solves the problem, but the errors disappear.

@ahcorde
Copy link
Contributor

ahcorde commented Nov 5, 2024

Pulls: #1292
Gist: https://gist.githubusercontent.com/ahcorde/10c88842f6a0214798ced8a732db1a79/raw/55ef5e2f9dd340df75e97da603929f47aa3f90e6/ros2.repos
BUILD args: --packages-above-and-dependencies rviz_rendering --packages-above-and-dependencies rviz_rendering
TEST args: --packages-above rviz_rendering --packages-above rviz_rendering
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14789

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening the PR, it is appreciated.

I'm just trying to understand a bit why this makes a difference. Looking at the code, by default, when you call OgreManualObject::begin, it puts all "positions" and "normals" after this into the DEFAULT_RESOURCE_GROUP_NAME, which ends up being the string "General". That's at least part of the warning message that you've seen. But I can't quite put my finger on why this would make a difference.

Is there any chance you could share a mesh and a rviz configuration file that shows the problem? I may be able to trace it a bit better that way. Thanks.

Copy link
Contributor

@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know anything about the ogre API, but I do se other places are using "rviz_rendering" as the resource group name, https://github.com/search?q=repo%3Aros2%2Frviz+%5C%22rviz_rendering%5C%22&type=code

Including in the "MaterialManager": https://ogrecave.github.io/ogre/api/13/class_ogre_1_1_material_manager.html#a3068599a5b10421e6203d568006f5f93

Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().create(name, "rviz_rendering");

@MichaelOrlov
Copy link

@Markus-Simonsen Could you please address linter errors?

rviz_rendering.cpplint.whitespace/line_length [2] (/tmp/ws/src/rviz/rviz_rendering/src/rviz_rendering/objects/mesh_shape.cpp:77)
(https://build.ros2.org/job/Rpr__rviz__ubuntu_noble_amd64/162/testReport/junit/rviz_rendering/cpplint/whitespace_line_length__2____tmp_ws_src_rviz_rviz_rendering_src_rviz_rendering_objects_mesh_shape_cpp_77_/history)
Error Message
Lines should be <= 100 characters long

@MichaelOrlov MichaelOrlov added the in review Waiting for review (Kanban column) label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants